package org.project.service.mq;

import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
 

public class JMSSenderTest {

	
	///  send 用不了 接收能用
	@Test
	public void jmsSender() {
		ApplicationContext app = new ClassPathXmlApplicationContext("applicationContext-ibmmq.xml");
		JMSSender sender = (JMSSender)app.getBean("jmsSender");
		sender.sendMesage("watson");
	}
	
	//@Test
	public void jmsReceiver() {
		ApplicationContext app = new ClassPathXmlApplicationContext("applicationContext-ibmmq.xml");
		JMSReceiver receiver = (JMSReceiver)app.getBean("jmsReceiver");
		receiver.processMessage();
	}
 
}
